﻿<UserControl
    x:Class="yavc.Metro.Controls.SelectModeControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:yavc.Metro.Controls"
    xmlns:conv="using:yavc.Metro.Converters">
    <UserControl.Resources>
        <conv:SelectionModeBrushConverter x:Key="sceneBrush" Mode="Scene" Brush="{StaticResource MetroAccentBrush}" />
        <conv:SelectionModeBrushConverter x:Key="inputBrush" Mode="Input" Brush="{StaticResource MetroAccentBrush}" />
        <conv:SelectionModeBrushConverter x:Key="dspBrush" Mode="DSP" Brush="{StaticResource MetroAccentBrush}" />
        <conv:SelectionModeBrushConverter x:Key="zoneBrush" Mode="Zone" Brush="{StaticResource MetroAccentBrush}" />
        <conv:SelectionModeBrushConverter x:Key="playBrush" Mode="Play" Brush="{StaticResource MetroAccentBrush}" />

        <Style TargetType="Button">
            <Setter Property="BorderThickness" Value="0,0,2,0" />
            <Setter Property="VerticalAlignment" Value="Stretch" />
            <Setter Property="HorizontalAlignment" Value="Stretch" />
            <Setter Property="Padding" Value="2.5" />
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBlock Text="{Binding}" FontSize="{Binding Source={StaticResource BaseValue}, Path=Value, Converter={StaticResource convMetroTextLargeFontSize}}" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <local:UniformGrid Columns="1">
        <Button Click="Zone_Click" Content="zone" Background="{Binding SelectionMode, Converter={StaticResource zoneBrush}}" />
        <Button Click="Inputs_Click" Content="input" Background="{Binding SelectionMode, Converter={StaticResource inputBrush}}" />
        <Button Click="DSP_Click" Content="dsp" Background="{Binding SelectionMode, Converter={StaticResource dspBrush}}" 
                    Visibility="{Binding Path=SelectedZone.CanSelectDSP, Converter={StaticResource truVis}}" />
        <Button Click="Scenes_Click" Content="scene" Background="{Binding SelectionMode, Converter={StaticResource sceneBrush}}" 
                    Visibility="{Binding Path=SelectedZone.CanSelectScene, Converter={StaticResource truVis}}" />
        <Button Click="Play_Click" Content="play" Background="{Binding SelectionMode, Converter={StaticResource playBrush}}" 
                    Visibility="{Binding Path=SelectedZone.CanViewPlayback, Converter={StaticResource truVis}}" />
    </local:UniformGrid>
</UserControl>
